﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;

namespace MDCAdminTool.Commands
{
    class ShowCacheMetrics : AsyncCommandBindingBase
    {
        public ShowCacheMetrics()
            : base()
        {
            Command = Application.Current.Resources["ShowCacheMetrics"] as ICommand;
        }

        protected override void OnExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var cache = e.Parameter as MdcCache;
            if (cache == null)
            {
                return;
            }

        	cache.LoadStatistics();
        }

    }
}
